package com.example.calc;

import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class Operando {

	private double valor;
	private int decimalfactor = 0;
	
	public void adddigito(int d){
		if(decimalfactor ==0){
		this.valor = valor * 10.0+d;
	}
		else 
	{
		valor+=1.0/decimalfactor*d;
		decimalfactor*=10;
	}
			
	}
	
		public void setDecimal()
	{
		if(decimalfactor ==0)
		{
			decimalfactor=10;
		}	
	}
		
		public double getValue(){
			return valor;
		}
		
		public void numberPressed(View v)
		{
			Button b = (Button)v;
			int digito = Integer.parseInt(b.getText().toString());
		/*	final Button button = (Button) findViewById(R.id.button1);
		/*	textView1.setText(digito);
		/*	if()
			{
				
			}else
			{
				
			}
		*/	
		}
	/*	
		public void pointPressed(View v)
		{
		operando1.setDecimal();	
		}
		
	public void operacaoSoma(){
		operacao = new OperacaoSoma();
	operando2 = new Operando();
	}
	
	public void calcular(View vv){
		if(operando == null)
			return;
		operando1 = new Operando.compute(operando1, operando):
		operando2 = null;
	}
*/
}
